package com.unionpay.upyzt.net;

import lombok.Data;

@Data
public class UpyztResponse {

    private int responseCode;
    private String responseBody;
    private final HttpHeaders responseHeaders;
    private int numRetries;

    /**
     * @param responseCode the HTTP Status Code
     * @param responseBody the response body
     */
    public UpyztResponse(int responseCode, String responseBody) {
        this.responseCode = responseCode;
        this.responseBody = responseBody;
        this.responseHeaders = null;
    }

    /**
     * @param responseCode    the HTTP Status Code
     * @param responseBody    the response body
     * @param responseHeaders the response headers
     */
    public UpyztResponse(int responseCode, String responseBody, HttpHeaders responseHeaders) {
        this.responseCode = responseCode;
        this.responseBody = responseBody;
        this.responseHeaders = responseHeaders;
    }
}
